import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import bsLogin from '@/components/bsLogin'
import bsRegist from '@/components/bsRegist'
import bsActivePage from '@/components/bsActivePage'
import bsApplyDetail from '@/components/bsApplyDetail'
import bsAppendUnit from '@/components/bsAppendUnit'
import bsGetPassword from '@/components/bsGetPassword'
import OssUpload from '@/components/Test/OssUpload'
import FixUpload from '@/components/Test/FixUpload'
import Up from '@/components/Test/Up'
import yw_Home from '@/components/yw_Home'
import yw_resourceInfo from '@/components/yw_ResourceInfo'


Vue.use(Router)

export default new Router({
  scrollBehavior(to,from,savedPosition){
    return{ x:0,y:0}
  },
  model:history,
  routes: [
    {
      path: '/',
      redirect:'yw_Home',
      meta:{
      	title:'首页'
      },
      component:yw_Home
    },
    {path: '/bsLogin', name: 'bsLogin', component: bsLogin,meta:{title:'登录'}},
    {path: '/bsRegist', name: 'bsRegist', component: bsRegist,meta:{title:'注册'}},
    {path: '/bsActivePage', name: 'bsActivePage', component: bsActivePage,meta:{title:'活动',needUserId:true}},
    {path: '/bsApplyDetail', name: 'bsApplyDetail', component: bsApplyDetail,meta:{title:'活动填报',needUserId:true}},
    {path: '/bsAppendUnit', name: 'bsAppendUnit', component: bsAppendUnit,meta:{title:'新增单位',needUserId:true}},
    {path: '/bsGetPassword', name: 'bsGetPassword', component: bsGetPassword,meta:{title:'找回密码'}},
    {path: '/OssUpload', name: 'OssUpload', component: OssUpload},
    {path: '/FixUpload', name: 'FixUpload', component: FixUpload},
    {path: '/Up', name: 'Up', component: Up},
	{
		path:'/yw_Home',
		name:'yw_Home',
		meta:{
			title:'首页'
		},
		component:yw_Home
	},
	{
		path:'/yw_resourceInfo',
		name:'yw_resourceInfo',
		meta:{
			title:'资源详情',
			needUserId:true
		},
		component:yw_resourceInfo
	}

  ]
})

Vue.use(require('vue-wechat-title'));

